% ternary demo2
% ----------------------
% @author : slandarer
% 公众号  : slandarer随笔
% 知乎    : slandarer

figure('Name','ternary demo2','Units','normalized','Position',[.05,.2,.42,.56])

% 初始化三元相图(Init ternary plot)
STA=STernary();

% 绘制折线图及散点(Draw lines and scatter)
STA.SPlot([2,2],[3,0],[5,8],'LineWidth',4,'Color',[.8,0,0]);
STA.SPlot([2,7],[3,3],[5,0],'LineWidth',4,'Color',[0,.8,0]);
STA.SPlot([2,0],[3,5],[5,5],'LineWidth',4,'Color',[0,0,.8]);
STA.SScatter(2,3,5,180,'filled','CData',[1,1,1],'MarkerEdgeColor',[0,0,0],'LineWidth',2);

% 绘制文本(Draw text)
STA.SText(2+1,3,5,'(20%,30%,50%)','FontSize',16,'FontName','Cambria')